Skip to content

DOC-2254: Add Confluent Schema Registry schema migration via Shadowing#1776

Open
Feediver1 wants to merge 10 commits into
betafrom
DOC-2254-confluent-schema-registry-migration
Open

DOC-2254: Add Confluent Schema Registry schema migration via Shadowing#1776
Feediver1 wants to merge 10 commits into
betafrom
DOC-2254-confluent-schema-registry-migration

Conversation

@Feediver1

@Feediver1 Feediver1 commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Documents the new v26.2 Schema Registry API-mode replication (shadow_schema_registry_api) for shadow links:

  • New page: Migrate Schemas from Confluent Schema Registry (intro, use cases, prerequisites, limitations, config steps, filtering, context mapping, validation policy, monitoring, failover)
  • setup.adoc: present topic mode vs API mode in the Schema Registry synchronization section
  • overview.adoc: add Schema Registry Sync task tab and update the replication lists
  • monitor.adoc: add Schema Registry sync status bullet
  • nav.adoc: add nav entry under Shadowing

Review deadline: July14

Description

Resolves https://redpandadata.atlassian.net/browse/DOC-2254

Page previews

Sources of truth

All YAML field names verified against src/go/rpk/pkg/cli/shadow/types.go (dev) and the types_test.go example config. Defaults (10s tail / 5m full sync / 30 rps, FAIL policy) from src/v/cluster_link/model/types.h. Merged engineering PRs: redpanda#30695, #30723, #30764, #30835, #30860, #30905, #30933.

⚠️ Verify before merge (unreleased feature, ENG-1171)

Two engineering PRs were still open at draft time. // DRAFT-VERIFY (DOC-2254) comments in the new page mark each item:

  • HTTP source reader + destination bootstrap (redpanda#30999): confirm whether the destination Schema Registry must be empty
  • Failover mechanism via paused (redpanda#30984)
  • Exact list of unsupported Confluent schema features (SME: @pgellert)
  • Wildcard support in source_filter (epic mentions wildcards; rpk source shows plain string lists)
  • rpk shadow create argument order against a 26.2 build
  • Re-check defaults at code-complete

Related

  • Cloud twin: DOC-2307 (deferred; new content is wrapped in single-source tags with env-cloud conditionals, ready for the cloud-docs stub)
    • Note for the DOC-2307 stub: the :learning-objective-N: attributes are defined outside the single-source tag, but the {learning-objective-N} references are inside it. The cloud-docs stub header must define the same three attributes or the cloud build will render the references literally.
  • Companion glossary PR (shared branch): DOC-2254: Add Shadowing and Schema Registry context glossary terms #1777 (merge before or with this PR). Overlaps DOC-1660 (in progress).

Checks

  • New feature
  • Content gap
  • Support Follow-up
  • Small fix (typos, links, copyedits, etc)

🤖 Generated with Claude Code

Documents the new v26.2 Schema Registry API-mode replication
(shadow_schema_registry_api) for shadow links:

- New page: Migrate Schemas from Confluent Schema Registry
  (intro, use cases, prerequisites, limitations, config steps,
  filtering, context mapping, validation policy, monitoring, failover)
- setup.adoc: present topic mode vs API mode in the Schema Registry
  synchronization section
- overview.adoc: add Schema Registry Sync task tab and update the
  replication lists
- monitor.adoc: add Schema Registry sync status bullet
- nav.adoc: add nav entry under Shadowing

Feature is unreleased (ENG-1171, targets 26.2). DRAFT-VERIFY comments
mark items to re-check after redpanda#30999 and redpanda#30984 merge.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@Feediver1 Feediver1 requested a review from a team as a code owner July 2, 2026 18:55
@netlify

netlify Bot commented Jul 2, 2026

Copy link
Copy Markdown

👷 Deploy Preview for redpanda-docs-preview processing.

Name Link
🔨 Latest commit b415279
🔍 Latest deploy log https://app.netlify.com/projects/redpanda-docs-preview/deploys/6a596248d1aa52000886481f

@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 8109c7c4-9843-4d89-a48d-6cc9c79f94f1

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch DOC-2254-confluent-schema-registry-migration

Comment @coderabbitai help to get the list of available commands.

Comment thread modules/manage/pages/disaster-recovery/shadowing/migrate-schemas-confluent.adoc Outdated
Feediver1 and others added 4 commits July 8, 2026 16:28
Intro now follows what-it-does / how-it-works / benefit / when-to-use
instead of opening with an imperative. Duplicate glossterms downgraded
now that first mentions moved into the intro.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…lication

Full-file example anchors the per-setting fragments that follow:
name + client_options + topic sync (from the canonical setup.adoc
sample) plus the complete shadow_schema_registry_api section (field
names verified against rpk types_test.go). Links to Configure
Shadowing for the full connection/auth reference.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Adds lines=20-38 highlighting to the sample shadow link configuration
so the shadow_schema_registry_api block stands out from the framing
sections, and points to it from the lead-in.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* *Migrate from Confluent to Redpanda*: Replicate schemas continuously while xref:manage:disaster-recovery/shadowing/setup.adoc[Shadowing] replicates your topic data, then cut applications over to Redpanda once both are in sync. No separate schema migration tooling is required.
* *Phased migration*: Use context and subject filters to migrate one team, application, or environment at a time.
* *Registry reorganization*: Map source contexts to different destination contexts to restructure your Schema Registry as part of the migration.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pgellert do we want to also mention here about disaster recovery? 🤔

Comment thread modules/manage/pages/disaster-recovery/shadowing/migrate-schemas-confluent.adoc Outdated
# connect to the source Kafka cluster, see the complete configuration file
# reference in Configure Shadowing.

topic_metadata_sync_options:

@bartoszpiekny-redpanda bartoszpiekny-redpanda Jul 9, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure we need to provide topic_metadata_sync_options in context of schema registry shadowing 🤔

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we can remove the topic_metadata_sync_options section here, it's not needed.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed in be45498 — the sample now goes straight from client_options to schema_registry_sync_options, and the highlight range is updated to match.

Addresses review feedback asking for explicit guidance on choosing
between the two Schema Registry sync modes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@Feediver1 Feediver1 requested a review from trevpanda July 10, 2026 19:04
* Use *topic mode* (`shadow_schema_registry_topic`) when the source is another Redpanda cluster and you want an exact, complete replica of its Schema Registry. Topic mode shadows the `_schemas` topic byte for byte, so it does not filter, remap, or validate schemas.
* Use *API mode* (`shadow_schema_registry_api`) when the source is a Confluent Schema Registry, or when you need to replicate only selected contexts or subjects, map source contexts to different destination contexts, or control how schemas that use unsupported features are handled with a validation policy.

Schema replication does not add any cluster configuration properties. All settings live in the shadow link configuration.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is false as stated, because we do add 2 new cluster configurations: https://github.com/redpanda-data/redpanda/blob/c153614a6972b0ee9e109ae93dc9d0a9369a1d37/src/v/config/configuration.cc#L3981-L3996

But they are escape hatches / tunables that won't commonly need to be adjusted.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in be45498 — replaced the claim with the two tunables (schema_registry_sync_memory_bytes, schema_registry_sync_parallelism) and noted the defaults suit most deployments.


== Limitations

* HTTP basic authentication is the only supported authentication method for the source registry.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mTLS is also supported as an authentication mechanism, in addition to HTTP Basic

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in be45498 — the limitation now lists HTTP basic and mTLS, and the connection section explains mTLS means a client certificate and key in tls_settings instead of auth_options.

Comment on lines +78 to +79
// DRAFT-VERIFY (DOC-2254): Get the exact list of unsupported Confluent schema features
// (rule sets? metadata tags?) from @pgellert and document them here.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In schema definitions:

  • rule sets
  • metadata tags
    In configs:
  • override metadata
  • override rule set
  • default metadata
  • default rule set
  • compatibility group (note: not the same as compatibility level)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Documented in be45498 — the validation policy section now lists these (schema definitions: rule sets, metadata tags; configs: override/default metadata and rule sets, compatibility groups), with your note that compatibility groups are not compatibility levels.

Comment on lines +80 to +82
// DRAFT-VERIFY (DOC-2254): ENG-1171 mentions wildcard support in filters, but the rpk
// source shows plain string lists for contexts/subjects. Confirm whether wildcards or
// patterns are accepted before documenting either behavior.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only plain string lists for contexts and subjects is supported

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Documented in be45498 — 'The contexts and subjects lists accept literal names only. Wildcard and prefix patterns are not supported.' DRAFT-VERIFY removed.

# connect to the source Kafka cluster, see the complete configuration file
# reference in Configure Shadowing.

topic_metadata_sync_options:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we can remove the topic_metadata_sync_options section here, it's not needed.

Comment on lines +113 to +124
Schema Registry Sync::
+
--
[#schema-registry-sync-task]
The **Schema Registry Sync task** replicates Schema Registry content so that applications that depend on schemas keep working after failover.

The task is controlled by the `schema_registry_sync_options` section in the configuration file. It supports two modes:

* **Topic mode** (`shadow_schema_registry_topic`): Shadows the `_schemas` system topic for byte-for-byte replication from another Redpanda cluster.
* **API mode** (`shadow_schema_registry_api`): Polls the source Schema Registry over HTTP and imports selected contexts and subjects, with validation. Use this mode to replicate schemas from a Confluent Schema Registry. See xref:manage:disaster-recovery/shadowing/migrate-schemas-confluent.adoc[Migrate Schemas from Confluent Schema Registry].

A shadow link uses one mode or the other, not both.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One nuance here is that only API mode shadowing actually creates a explicit "Schema Registry Sync Task" that shows up in rpk shadow status. Topic mode replication just adds the _schemas topic to the list of topic partitions to shadow, it doesn't create a separate "Schema Registry Sync Task".

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added in be45498 — the tab now notes that only API mode runs as a separate task in the shadow link status, and topic mode is monitored like any other shadow topic.

Comment on lines +67 to +69
// DRAFT-VERIFY (DOC-2254): Confirm with @pgellert whether the destination Schema Registry
// (_schemas topic) must be empty before enabling API-mode sync, or whether the destination
// bootstrap in redpanda#30999 relaxes this. Topic mode requires it; API mode is unconfirmed.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In API mode, the schemas topic doesn't have to be empty, but the target contexts the link would import (scoped to the mapped contexts based on the source_filter and destination fields) need to be empty.

Ref: redpanda-data/redpanda#31011

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in be45498 — the DRAFT-VERIFY is replaced with a prerequisite: the destination contexts the link replicates into (per source_filter and destination mapping) must be empty, and the rest of the shadow cluster's registry is unaffected.

Comment thread modules/manage/pages/disaster-recovery/shadowing/migrate-schemas-confluent.adoc Outdated
Choose how replicated contexts are named on the shadow cluster:

* `identity`: Keep the source context names (default behavior for migrations).
* `exact`: Map each source context to a different destination context.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's important to call out here that exact mapping needs to be exhaustive, and if the source schema registry has any contexts that are not mapped, that will lead to a failure of the schema syncing task.
We should recommend that people consider setting up a source_scope filter for the mapped source contexts if they expect that other contexts may later be created on the source schema registry that would fail the sync at a future inconvenient time.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added in be45498 as an IMPORTANT under the exact mapping example: mappings must cover every replicated context, an unmapped context fails the task, and we recommend scoping the source_filter contexts list to the mapped contexts to guard against contexts created later.

// (_schemas topic) must be empty before enabling API-mode sync, or whether the destination
// bootstrap in redpanda#30999 relaxes this. Topic mode requires it; API mode is unconfirmed.

== Limitations

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another limitation to add is that there is currently no coordination between topic data replication and the schema registry syncing task, so topic data serialized with Confluent's SerDes format may contain schema IDs on the shadow cluster earlier than those schemas get replicated over.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added in be45498 as a limitation: topic data replication and schema replication are not coordinated, so records in the Confluent SerDes wire format can arrive before the schema IDs they contain have replicated.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pgellert what's the impact of this? Users should not attempt to read from topics that rely on SR until SR synced? Or will this cause write or replication errors?

* *Phased migration*: Use context and subject filters to migrate one team, application, or environment at a time.
* *Registry reorganization*: Map source contexts to different destination contexts to restructure your Schema Registry as part of the migration.

== Prerequisites

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One more to add here: if schema registry contexts are being used, customers must have the schema_registry_enable_qualified_subjects config enabled -- https://docs.redpanda.com/streaming/current/manage/schema-reg/schema-reg-contexts/#prerequisites

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added in be45498 as a prerequisite, with xrefs to the schema_registry_enable_qualified_subjects property reference and the Schema Registry Contexts prerequisites. Noted it's enabled by default.

Feediver1 and others added 2 commits July 16, 2026 12:17
…as-confluent.adoc

Co-authored-by: Gellért Peresztegi-Nagy <gellert.nagy@redpanda.com>
Corrections and additions from pgellert's review:

- Two cluster tunables do exist (schema_registry_sync_memory_bytes,
  schema_registry_sync_parallelism); replace the "no cluster
  configuration properties" claim
- mTLS is supported alongside HTTP basic auth for the source registry
- Prerequisites: destination contexts owned by the link must be empty
  (rest of the registry need not be); qualified subjects config
  required for non-default contexts
- Limitations: topic data and schema replication are not coordinated
  (SerDes records can reference not-yet-replicated schema IDs)
- Remove topic_metadata_sync_options from the sample config and fix
  the highlight range
- Filters accept literal names only (no wildcards/prefixes)
- exact context mappings must be exhaustive: unmapped source contexts
  fail the task; recommend scoping source_filter
- List the unsupported Confluent features (rule sets, metadata tags,
  override/default metadata and rule sets, compatibility groups)
- Monitoring: task runs on the _schemas partition leader; counters are
  ephemeral and reset on restart or leadership movement
- Failover: pausing the SR sync task (paused: true) is a required
  step; failover alone does not stop schema replication
- overview.adoc: only API mode runs as a separate task in link status

Resolves all DRAFT-VERIFY items except the sync-defaults re-check.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@Feediver1 Feediver1 requested a review from pgellert July 16, 2026 17:33
default_tail_interval=10s, default_full_sync_interval=5m,
default_max_source_requests_per_second=30 confirmed in
src/v/cluster_link/model/types.h at the v26.2.1-rc3 tag,
matching the documented values.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

@trevpanda trevpanda left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great, I left a few suggestions.

Comment thread modules/manage/pages/disaster-recovery/shadowing/migrate-schemas-confluent.adoc Outdated
Comment thread modules/manage/pages/disaster-recovery/shadowing/migrate-schemas-confluent.adoc Outdated
// (_schemas topic) must be empty before enabling API-mode sync, or whether the destination
// bootstrap in redpanda#30999 relaxes this. Topic mode requires it; API mode is unconfirmed.

== Limitations

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pgellert what's the impact of this? Users should not attempt to read from topics that rely on SR until SR synced? Or will this cause write or replication errors?

- orders-value # A subject in the default context
----

The `contexts` and `subjects` lists accept literal names only. Wildcard and prefix patterns are not supported.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pgellert how do the source filters on subjects work in conjunction with context filters? Does the example above really only apply "orders-value" subject in the default context? What about the .prod context?

Comment thread modules/manage/pages/disaster-recovery/shadowing/migrate-schemas-confluent.adoc Outdated
Comment thread modules/manage/pages/disaster-recovery/shadowing/migrate-schemas-confluent.adoc Outdated
Comment thread modules/manage/pages/disaster-recovery/shadowing/migrate-schemas-confluent.adoc Outdated
Co-authored-by: Trevor Blackford <trevor.blackford@redpanda.com>
@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 60d162c2-ebe2-4fc3-bc3f-f1a3385cfa12

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch DOC-2254-confluent-schema-registry-migration

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants